<form action="<?= URL::site("admin/newBook")?>" method="POST" >
	<fieldset>
		<legend>Nuevo libro</legend>
		<?
			if(isset($errors)) {
			?>
			<div class="error_box">
			<?
				foreach($errors as $error) {
				?>
					<div><?= $error ?></div>
				<?
				}
			?>
			</div>
			<?
			}
		?>
		<table>
			<tr>
				<td><label for="title">Título</label></td>
				<td><input type="text" name="title" value="<?= isset($post['title']) ? $post['title'] : ""; ?>" /></td>
			</tr>
			<tr>
				<td><label for="isbn">ISBN</label></td>
				<td><input type="text" name="isbn" value="<?= isset($post['isbn']) ? $post['isbn'] : ""; ?>" /></td>
			</tr>
			<tr>
				<td><label for="autor">Autor</label></td>
				<td><input type="text" name="author" value="<?= isset($post['author']) ? $post['author'] : ""; ?>" /></td>
			</tr>
			<tr>
				<td><label for="image">Imagen</label></td>
				<td><input type="file" name="image" /></td>
			</tr>
			<tr>
				<td><label for="brain_score">Brain Score (inicial)</label></td>
				<td><input type="text" name="brain_score" value="" /></td>
			</tr>
			<tr>
				<td><label for="description">Descripción</label></td>
				<td><textarea name="description"></textarea></td>
			</tr>
			<tr>
				<td></td>
				<td>
					<input type="submit" value="Crear libro" />
					<input type="reset" value="Borrar formulario" />
				</td>
			</tr>
		</table>
	</fieldset>	
</form>
